<template>
<a :href="href" target="_blank" 
:disabled="disabled?true:undefined"
:style="{color:color}"
:class="['common',type,underline?'underline':'',disabled?'wxj_noallowed':'']">
<slot>
default_link
</slot>
</a>
</template>
<script lang='ts' setup>
import {defineProps} from "vue";

const props=defineProps({
    color:{
        type:String,
    },
    href:{
        type:String,
        default:"#"
    },
    disabled:{
        type:Boolean,
    },
    underline:{
        type:Boolean,
    },
    type:{
        type:String,
        default:"success"
    },   
})

</script>
<style lang="scss" scoped>
.common{
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    color: #369
}

.success{
    color: #369 
}

.error{
    color:rgb(207, 45, 45)
}

.warning{
    color:rgb(247, 243, 8)
}

.underline{
    text-decoration: underline !important;
}

</style>